<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateFeedTable extends Migrator
{
    public function up()
    {
        $this->table("feed")
            ->addColumn("content", "text")
            ->addColumn('uid', 'integer')
            ->addColumn('title', 'string',['limit'=>255])
            ->addColumn('create_time', 'integer')
            ->addColumn('show', 'integer',['null'=>true,'default'=>0])
            ->save();
    }
    public function down()
    {
        $this->table("feed")->drop();
    }
}
